package com.mall.business.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.mall.common.annotation.Excel;
import com.mall.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 订单对象 t_order
 *
 * @author ruoyi
 * @date 2025-03-30
 */
@Data
@TableName(value = "t_order")
@EqualsAndHashCode(callSuper = true)
public class TOrder extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * $column.columnComment
     */
    @TableId(type = IdType.ASSIGN_ID)
    private String id;
    /**
     * "订单编号"
     */
    @Excel(name = "订单编号")
    private String orderNo;
    /**
     * "商品名称"
     */
    @Excel(name = "商品名称")
    private String productName;
    /**
     * "用户Id"
     */
    @Excel(name = "用户Id")
    private String userId;
    /**
     * "订单总价"
     */
    @Excel(name = "订单总价")
    private BigDecimal totalPrice;
    /**
     * "订单商品总数"
     */
    @Excel(name = "订单商品总数")
    private Long totalNum;
    /**
     * "实际支付金额"
     */
    @Excel(name = "实际支付金额")
    private BigDecimal payPrice;
    /**
     * "订单状态 1:待付款  2已付款(待发货)   3:已发货（待收货） 4:收货(已经完成)    6 失败
     */
    @Excel(name = "订单状态")
    private String orderStatus;

    /**
     * "物流公司名称"
     */
    @Excel(name = "物流公司名称")
    private String expressName;
    /**
     * "物流单号"
     */
    @Excel(name = "物流单号")
    private String expressNo;

    /**
     * "下单时间"
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "下单时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date orderTime;
    /**
     * "完成时间"
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date finallyTime;
    /**
     * "取消时间"
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "取消时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date cancelTime;
    /**
     * "支付时间"
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;

    /**
     * "发货时间"
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "发货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date sendTime;


    /**
     * "是否已经支付，0：已经支付过   1：，没有支付过"
     */
    @Excel(name = "是否已经支付，0：已经支付过   1：，没有支付过")
    private String isPayed;
    /**
     * "退款状态  0:默认,1:在处理,2:处理完成"
     */
    @Excel(name = "退款状态  0:默认,1:在处理,2:处理完成")
    private String refundStatus;
    /**
     * "是否退款  0 未退款  1 已退款"
     */
    @Excel(name = "是否退款  0 未退款  1 已退款")
    private String isRefund;
    /**
     * "使用积分"
     */
    @Excel(name = "使用积分")
    private BigDecimal useIntegral;
    /**
     * "给用户退了多少积分"
     */
    @Excel(name = "给用户退了多少积分")
    private BigDecimal backIntegral;
    /**
     * "退款金额"
     */
    @Excel(name = "退款金额")
    private BigDecimal refundPrice;
    /**
     * "订单关闭原因 "
     */
    @Excel(name = "订单关闭原因 1-超时未支付 2-买家取消")
    private String closeType;
    /**
     * "用户姓名"
     */
    @Excel(name = "用户姓名")
    private String realName;
    /**
     * "用户电话"
     */
    @Excel(name = "用户电话")
    private String userPhone;

    /**
     * "省"
     */
    @Excel(name = "省")
    private String province;
    /**
     * "市"
     */
    @Excel(name = "市")
    private String city;
    /**
     * "区域"
     */
    @Excel(name = "区域")
    private String county;




    /**
     * "用户地址"
     */
    @Excel(name = "用户地址")
    private String userAddress;
    /**
     * "优惠券id"
     */
    @Excel(name = "优惠券id")
    private String couponId;
    /**
     * "优惠券金额"
     */
    @Excel(name = "优惠券金额")
    private BigDecimal couponPrice;
    /**
     * "拼团活动Id"
     */
    @Excel(name = "拼团活动Id")
    private String ptActiveId;
    /**
     * "秒杀活动Id"
     */
    @Excel(name = "秒杀活动Id")
    private String seckillId;
    /**
     * "拼团Id"
     */
    @Excel(name = "拼团Id")
    private String pinkId;
    /**
     * "抵扣金额"
     */
    @Excel(name = "抵扣金额")
    private BigDecimal dkPrice;

    /**
     * "评论状态： 1 未评价  0 已评价"
     */
    @Excel(name = "评论状态： 1 未评价  0 已评价")
    private String isComment;



    /**
     * "审核时间"
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date checkDate;
    /**
     * "审核状态"
     */
    @Excel(name = "审核状态")
    private String checkStatus;
    /**
     * "审核备注"
     */
    @Excel(name = "审核备注")
    private String checkRemark;

    /**
     * "提交时间"
     */
    private Date commitDate;


    /**
     * "银行账户信息"
     */
    @Excel(name = "银行账户信息")
    private String bankInfo;

    /**
     * "银行打款凭证"
     */
    @Excel(name = "银行打款凭证")
    private String bankPayImage;

    /**
     * "支付方式  支付方式  1 微信 2 积分  3对公打款 4 积分抽奖 5优惠券 "
     */
    @Excel(name = "支付方式  1 微信 2 积分  3对公打款 4 积分抽奖 5优惠券 ")
    private String payType;

    /**
     * "用户名称"
     */
    @TableField(exist = false)
    private String nickName;


    // 订单明细
    @TableField(exist = false)
    private   List<TOrderItem> orderItemList;





}
